import { asyncfindallschool, asyncgetschoolpackegekey } from "../../../../plugins/api.js"
import * as types from './mutation-types'

export const actionstart = function ({ commit }) {
  commit(types.SET_START)
}


export const actionschool = async function ({
  commit
}) {
  try {
    const data = await asyncfindallschool()
    commit(types.SET_SCHOOL, data)
  } catch (err) {
    return false
  }
}

export const actionschoolpackegekey = async function ({
  commit
}) {
  try {
    const data = await asyncgetschoolpackegekey()
    commit(types.SET_SCHOOLPACKEGEKEY, data)
  } catch (err) {
    return false
  }
}
